import common

#Baseclass
class AABB:
    name = 'AABB'
    def __init__(self,pos,xw,yw):
        self.x,self.y = pos
        self.xvel, self.yvel= 0,0
        self.xw = xw
        self.yw = yw
        
    def update(self):
        self.x += self.xvel
        self.y += self.yvel
             
    def build(self):
               
        self.points = common.buildpoints(self)   
          
class Poly:
    name = 'Poly'
    def __init__(self,pos,points):
        self.x,self.y = pos
        self.xvel,self.yvel = 0,0
        self.points = points
        common.alignpoints(self)        
        self.angles = common.buildangles(self.points)
        print self.points
        print self.angles
        
    def update(self):
        self.x += self.xvel
        self.y += self.yvel
    def build(self):
        common.alignpoints(self)